home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / mac / proj_a1.hqx / Project Mac - A1 / Amateur Radio Grid Locator (.txt) < prev    next >
AmigaBASIC Source Code  |  1987-12-04  |  2KB  |  56 lines

  1. '  ********************************************************
  2. '  *         PROGRAM FOR COMPUTING MAIDENHEAD LOCATOR SQUARES         *
  3. '  ********************************************************
  4. '  *  This program is from "The ARRL World Grid Locator Atlas"                *
  5. '  *  Copyright 1984 Folke Rosval, SM5AGM.  This atlas is Available         *
  6. '  *  from ARRL HQ for $4.00 . This program entered and modified for the *             *
  7. '  *  Macintosh by  Jim Bradbury, WB5ACL / DA2ND, December 1987         *
  8. '  ********************************************************
  9.         PRINT"This Program Calculates Maidenhead Locator Squares"
  10.         PRINT "as found in 'The ARRL World Grid Locator Atlas.'"
  11.         PRINT
  12.         PRINT"For Western Longitude and Southern Latitude - Enter Neg Values."
  13.         PRINT
  14.         PRINT 
  15.         PRINT "        Example Locations                            Lat         Long"
  16.         PRINT "Worms, Germany (Taukkunen Bks)      = 49í40'N   08í21'E"
  17.         PRINT "Mannheim, Germany (Taylor Bks)        = 49í31'N   08í33'E"
  18.         PRINT "Mannheim, Germany (Hammond Bks)   = 49í28'N   08í33'E"
  19.         PRINT 
  20.  100 PRINT"(D)egrees, (M)inutes, (S)econds"
  21. 120 INPUT"Enter Latitude (D, M, S) "; LatD, LatM, LatS
  22.         E=1e-06
  23.         Lat = LatD + LatM/60 + LatS/3600 + E
  24.         IF Lat<-90 OR Lat >= 90 THEN 120
  25. 122 INPUT"Enter Longitude (D, M, S) ";longD, LongM, LongS
  26.         Long = longD + LongM/60 + LongS/3600 + E
  27.         IF Long <-180 OR Long >=  180 THEN 122
  28.  130 A = Long/20+9
  29.         B = Lat/10+9
  30.         C = INT(A)
  31.         D = INT(B)
  32.         A$ = CHR$(C+65) + CHR$(D+65)
  33.  140 A = (A-C) * 10
  34.         B = (B-D) * 10
  35.         C = INT(A)
  36.         D = INT(B)
  37.  150 A$ = A$ + CHR$(C+48) + CHR$(D+48)
  38.          A$ = A$ + CHR$(INT((A-C)*24)+65)+CHR$(INT((B-D)*24)+65)
  39. 160 PRINT 
  40.         PRINT "For Latitude ";
  41.         PRINT Lat"í";
  42.         IF Lat => 0 THEN PRINT "N;    ";
  43.         IF Lat < 0 THEN PRINT  "S;     ";
  44.         PRINT "Longitude "Long"í";
  45.         IF Long => 0 THEN PRINT "E"
  46.         IF Long <0 THEN PRINT "W"
  47.         PRINT "The Maidenhead Locator Square is  ";
  48.         <0xac48fe,0x07>(12):<0x14,0x00>(0):<0x14,0x01>(0)
  49.         PRINT A$
  50.         <0xac4949,0x07>(12):<0x14,0x00>(0):<0x14,0x01>(9)
  51.         PRINT
  52.         GOTO 100
  53.  
  54.         
  55.  
  56.